package com.oldbss.beans;

// Generated May 26, 2013 11:19:35 PM by Hibernate Tools 3.3.0.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CheckInOut generated by hbm2java
 */
@Entity
@Table(name = "check_in_out", catalog = "bss")
public class CheckInOut implements java.io.Serializable {

	private Integer transactionId;
	private Materialallocation materialallocation;
	private int noOfMale;
	private int noOfFemale;
	private int noOfChild;
	private PatientRecord patient;
	private Date checkInTime;
	private Date checkOutTime;
	private String townOfLastDeparture;
	private int depositAmount;
	private Date dateOfStay;
	private Date extDateOfStay;
	private Set<RoomAllocation> roomAllocations = new HashSet<RoomAllocation>(0);
	private Set<Tempcheckout> tempcheckouts = new HashSet<Tempcheckout>(0);
	private Set<Paymentsmade> paymentsmades = new HashSet<Paymentsmade>(0);

	public CheckInOut() {
	}

	public CheckInOut(int noOfMale, int noOfFemale, int noOfChild,
			PatientRecord patient, Date checkInTime, int depositAmount, Date dateOfStay) {
		this.noOfMale = noOfMale;
		this.noOfFemale = noOfFemale;
		this.noOfChild = noOfChild;
		this.patient = patient;
		this.checkInTime = checkInTime;
		this.depositAmount = depositAmount;
		this.dateOfStay = dateOfStay;
	}

	public CheckInOut(Materialallocation materialallocation, int noOfMale,
			int noOfFemale, int noOfChild, PatientRecord patient,
			Date checkInTime, Date checkOutTime, String townOfLastDeparture,
			int depositAmount, Date dateOfStay, Date extDateOfStay,
			Set<RoomAllocation> roomAllocations,
			Set<Tempcheckout> tempcheckouts, Set<Paymentsmade> paymentsmades) {
		this.materialallocation = materialallocation;
		this.noOfMale = noOfMale;
		this.noOfFemale = noOfFemale;
		this.noOfChild = noOfChild;
		this.patient = patient;
		this.checkInTime = checkInTime;
		this.checkOutTime = checkOutTime;
		this.townOfLastDeparture = townOfLastDeparture;
		this.depositAmount = depositAmount;
		this.dateOfStay = dateOfStay;
		this.extDateOfStay = extDateOfStay;
		this.roomAllocations = roomAllocations;
		this.tempcheckouts = tempcheckouts;
		this.paymentsmades = paymentsmades;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "transactionId", unique = true, nullable = false)
	public Integer getTransactionId() {
		return this.transactionId;
	}

	public void setTransactionId(Integer transactionId) {
		this.transactionId = transactionId;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "materialsAllocationId")
	public Materialallocation getMaterialallocation() {
		return this.materialallocation;
	}

	public void setMaterialallocation(Materialallocation materialallocation) {
		this.materialallocation = materialallocation;
	}

	@Column(name = "noOfMale", nullable = false)
	public int getNoOfMale() {
		return this.noOfMale;
	}

	public void setNoOfMale(int noOfMale) {
		this.noOfMale = noOfMale;
	}

	@Column(name = "noOfFemale", nullable = false)
	public int getNoOfFemale() {
		return this.noOfFemale;
	}

	public void setNoOfFemale(int noOfFemale) {
		this.noOfFemale = noOfFemale;
	}

	@Column(name = "noOfChild", nullable = false)
	public int getNoOfChild() {
		return this.noOfChild;
	}

	public void setNoOfChild(int noOfChild) {
		this.noOfChild = noOfChild;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "checkInTime", nullable = false, length = 19)
	public Date getCheckInTime() {
		return this.checkInTime;
	}

	public void setCheckInTime(Date checkInTime) {
		this.checkInTime = checkInTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "checkOutTime", length = 19)
	public Date getCheckOutTime() {
		return this.checkOutTime;
	}

	public void setCheckOutTime(Date checkOutTime) {
		this.checkOutTime = checkOutTime;
	}

	@Column(name = "townOfLastDeparture", length = 20)
	public String getTownOfLastDeparture() {
		return this.townOfLastDeparture;
	}

	public void setTownOfLastDeparture(String townOfLastDeparture) {
		this.townOfLastDeparture = townOfLastDeparture;
	}

	@Column(name = "depositAmount", nullable = false)
	public int getDepositAmount() {
		return this.depositAmount;
	}

	public void setDepositAmount(int depositAmount) {
		this.depositAmount = depositAmount;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "dateOfStay", nullable = false, length = 19)
	public Date getDateOfStay() {
		return this.dateOfStay;
	}

	public void setDateOfStay(Date dateOfStay) {
		this.dateOfStay = dateOfStay;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "extDateOfStay", length = 19)
	public Date getExtDateOfStay() {
		return this.extDateOfStay;
	}

	public void setExtDateOfStay(Date extDateOfStay) {
		this.extDateOfStay = extDateOfStay;
	}

	@OneToMany(fetch = FetchType.EAGER, mappedBy = "checkInOut")
	public Set<RoomAllocation> getRoomAllocations() {
		return this.roomAllocations;
	}

	public void setRoomAllocations(Set<RoomAllocation> roomAllocations) {
		this.roomAllocations = roomAllocations;
	}

	@OneToMany(fetch = FetchType.EAGER, mappedBy = "checkInOut")
	public Set<Tempcheckout> getTempcheckouts() {
		return this.tempcheckouts;
	}

	public void setTempcheckouts(Set<Tempcheckout> tempcheckouts) {
		this.tempcheckouts = tempcheckouts;
	}

	@OneToMany(fetch = FetchType.EAGER, mappedBy = "checkInOut")
	public Set<Paymentsmade> getPaymentsmades() {
		return this.paymentsmades;
	}

	public void setPaymentsmades(Set<Paymentsmade> paymentsmades) {
		this.paymentsmades = paymentsmades;
	}

	@Column(name = "patientId", nullable = false)
	public void setPatient(PatientRecord patient) {
		this.patient = patient;
	}
	@OneToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "patientId")
	public PatientRecord getPatient() {
		return patient;
	}

}
